package
{
	import com.game.element.cooldown.CoolDownSprite;
	
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class CoolDownText extends Sprite
	{
		private var coolDownSprite:CoolDownSprite = new CoolDownSprite;
		private var angle:int =1;
		private var arr:Array= [];
		public function CoolDownText()
		{
			super();
//			CoolDownSprite.CoolDownInit();

			for (var i:int = 0 ;i<=200;i++){
				var coolDownSprite:CoolDownSprite = new CoolDownSprite;
				coolDownSprite.x = 1000*Math.random();
				coolDownSprite.y = 580*Math.random();
				coolDownSprite.coolDown = Math.random()*100;
				addChild(coolDownSprite);
				arr.push(coolDownSprite);
			}
			
			addEventListener(Event.ENTER_FRAME,enterFrameHandler);
			
		}
		
		private function enterFrameHandler(e:Event):void{
			for each(var coolDownSprite:CoolDownSprite in arr){
				coolDownSprite.step();
			}
		}
	}
}